home *** CD-ROM | disk | FTP | other *** search
/ NetNews Offline 2 / NetNews Offline Volume 2.iso / news / comp / lang / c++-part1 / 6259 < prev    next >
Encoding:
Internet Message Format  |  1996-08-05  |  1.3 KB

  1. Path: srv1.freenet.calgary.ab.ca!dickson1
  2. From: Andrew Dickson <dickson1@freenet.calgary.ab.ca>
  3. Newsgroups: comp.lang.c++
  4. Subject: How to poll joystick in C++
  5. Date: Sun, 11 Feb 1996 08:57:32 -0700
  6. Organization: Calgary Free-Net
  7. Message-ID: <Pine.A32.3.91.960211084851.31374A-100000@srv1.freenet.calgary.ab.ca>
  8. NNTP-Posting-Host: dickson1@srv1.freenet.calgary.ab.ca
  9. Mime-Version: 1.0
  10. Content-Type: TEXT/PLAIN; charset=US-ASCII
  11.  
  12.  
  13. I am trying to write a small routine in C++ (first time I've used it 
  14. since college) that will event-trap the fire buttons on a joystick 
  15. attached to an IBM PC.
  16.  
  17. After searching through the libraries that came with my copy of Turbo 
  18. C++, I've come to the conclusion that there isn't a command equivalent to 
  19. BASIC's  ON STRIG( ) GOSUB ... in the libraries that this with TCPP. Are 
  20. there any equivalent functions available in other libraries? Does any one 
  21. out there have an old fossil of code that does this?
  22.  
  23. My best guess is that my routine will have to check the 
  24. memory address that stores the gameport status, and then branch on a 
  25. change in the bit that represents the gameport switch. Unfortunately, I 
  26. don't have a reference that tells me what this address is. Any hints here?
  27.  
  28. Any help would be appreciated.
  29.  
  30.  
  31. Andrew Dickson
  32. (A frustrated mechanical engineer who really just wants to know how fast 
  33. the damn shaft is spinning.)
  34.  
  35.  
  36.  
  37.  
  38.